from wtforms import StringField
from wtforms.validators import Length, DataRequired

from app.form.base_form import BaseForm


class LoginForm(BaseForm):
  """登录用户校验
  """
  username = StringField(validators=[
      DataRequired('用户名不允许为空'),
      Length(4, 32, message="用户名4~32个字符")
  ])
  password = StringField(validators=[
      DataRequired('密码不允许为空'),
      Length(6, 32, message="密码长度6~32个字符")
  ])
